package com.dkm.ec.sale.persistence.dao.impl;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.dkm.base.api.model.Page;
import com.dkm.base.db.mybatis.dao.MyBatisQueryDaoImpl;
import com.dkm.base.db.mybatis.impl.domain.MyBatisPage;
import com.dkm.ec.sale.persistence.dao.SaleReportQueryDao;
import com.dkm.ec.sale.persistence.entity.SaleReportPo;

/**
 * 对象功能:skg_sale_report QueryDao接口的实现
 * 开发公司:SKG.COM
 * 开发人员:YCM
 * 创建时间:2015-05-07 10:20:33
 */
@Repository
public class SaleReportQueryDaoImpl extends MyBatisQueryDaoImpl<String, SaleReportPo> implements SaleReportQueryDao{

    @Override
    public String getNamespace() {
        return SaleReportPo.class.getName();
    }

	@Override
	public List<SaleReportPo> findSoRankingData(Map<String, Object> params, Page page) {
		MyBatisPage defaultPage = (MyBatisPage)page;
		return super.sqlSessionTemplate.selectList(getNamespace() + ".getSaleSKUReport", params,defaultPage);
	}

	@Override
	public Integer countSoRankingData(Map<String, Object> params) {
		String statement=getNamespace() + ".countSoRankingData";
		Object object = sqlSessionTemplate.selectOne(statement,params);
		return (Integer)object;
	}
	
}
